import argparse

from scraper import Parser
from proxy import ParserProxy



def get_input_parameters():

    """ Получаем входные аргументы """

    parser = argparse.ArgumentParser()

    parser.add_argument('-b', dest='display_browser', default='no', required=False)
    parser.add_argument('-ic', dest='initial_category', default=0, required=False, type=int)
    parser.add_argument('-fc', dest='final_category', default=100000, required=False, type=int)
    parser.add_argument('-cs', dest='count_subcategories', default=100000, required=False, type=int)
    parser.add_argument('-cp', dest='count_page', default=100000, required=False, type=int)

    arguments = parser.parse_args()

    display_browser = arguments.display_browser
    initial_category = arguments.initial_category
    final_category = arguments.final_category
    count_subcategories = arguments.count_subcategories
    count_page = arguments.count_page

    data = (display_browser, initial_category, final_category, count_subcategories, count_page)

    return data


def main():

    """ Запуск бота """

    data = get_input_parameters()

#    proxy = ParserProxy(data)
#    proxy_list = proxy.start_parsing_proxy()

    parser = Parser(data)
    parser.start_parsing()



# ТОЧКА ВХОДА

if __name__ == '__main__':

    main()
